import ins from '@/utils/request.js'

export const publishAPI = (obj) => {
  return ins({
    method: 'POST',
    url: '/my/article/add',
    data: obj
  })
}
//  1.定义获取文章数据的接口
export const artlishAPI = (obj) => {
  return ins({
    method: 'get',
    url: '/my/article/list',
    // get中只有查询数据
    params: obj
  })
}

// 2.定义以id删除文章数据的接口

export const artdelAPI = (stx) => {
  return ins({
    method: 'delete',
    url: '/my/article/info',
    params: {
      id: stx
    }
  })
}

// 2.定义以id获取文章数据的接口

export const getartAPI = (stx) => {
  return ins({
    method: 'get',
    url: '/my/article/info',
    params: {
      id: stx
    }
  })
}
